home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / comm / bbs / cnet5demo.lha / cnet / rexx / botlogon.rexx next >
OS/2 REXX Batch file  |  1999-03-23  |  1KB  |  55 lines

  1. /* Small script for the small arexxclass demo */
  2.  
  3. options results
  4.  
  5. /* get port number from args */
  6. parse arg port
  7.  
  8. /* adress CNet control ARexx port */
  9. if show('P', "CONTROLREXX.1") then do
  10.     address CONTROLREXX.1
  11.  
  12.     /* Tell control to run the port  */
  13.     BOTLOGON 'PORT='port
  14.  
  15.     /* echo result to user */
  16.     say 'BOTLOGON 'port' RESULT: ' RESULT
  17.  
  18.     /* adress the CNet port now that the botlogon has begun */
  19.     address CNETREXX0
  20.  
  21.     /* tell the terminal type input prompt we want ANSI */
  22.     addkeys 'I'
  23.  
  24.     /* enter the bot user's account number */
  25.     addkeys "1!"||d2c(13)
  26.  
  27.     /* enter bot user's password */
  28.     addkeys "botpass"||d2c(13)
  29.  
  30.     /* bypass all prompts */
  31.     addkeys d2c(13)
  32.     addkeys d2c(13)
  33.  
  34.     /* enter some commands to demonstrate bot capability */
  35.     addkeys "WHO"||d2c(13)
  36.     lastcommand
  37.     lastcmd=result
  38.  
  39.     addkeys "OL0!"||d2c(13)
  40.     addkeys "Hi, how are you?"||d2c(13)
  41.  
  42.     /* bypass OLM from myself */
  43.     addkeys d2c(13)
  44.     addkeys d2c(13)
  45.     addkeys d2c(13)
  46.  
  47.     /* repeast command held in last command variable, retrieved after WHO was entered! */
  48.     addkeys lastcmd||d2c(13)
  49.  
  50.     /* logoff */
  51.     addkeys "o!"||d2c(13)
  52.  
  53.  
  54. end
  55.